package io.zhifei.modules.sys.system.entity.vo.order;

import cn.gjing.tools.excel.Excel;
import cn.gjing.tools.excel.ExcelField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/*
 * @Author wangyuanyue
 * @Date 2020/10/12 14:03
 * @Content 订单输出实体类
 */
@Data
@Excel(value = "订单表")
public class OrderVo implements Serializable {

    private static final long serialVersionUID = -1486821034453575311L;

    /**
     *订单流水号即是订单编号
     */
    @ApiModelProperty(value = "订单编号")
    @ExcelField(value = "订单编号")
    private String serialNumber;

    /**
     * 收货人
     */
    @ApiModelProperty(value = "收货人")
    @ExcelField(value = "收货人")
    private String receiveName;

    /**
     * 收货人电话
     */
    @ApiModelProperty(value = "联系电话")
    @ExcelField(value = "联系电话")
    private String receivePhone;

    /**
     * 订单总价
     */
    @ApiModelProperty(value = "订单金额")
    @ExcelField(value = "订单金额")
    private String amount;

    /**
     *状态（支付成功、未支付、支付失败）
     */
    @ApiModelProperty(value = "状态（1:未支付、2:已支付、3:已完成）")
    @ExcelField(value = "订单状态")
    private String status;

    /**
     *用户名
     */
    @ApiModelProperty(value = "用户名")
    @ExcelField(value = "用户名称")
    private String userName;

    /**
     *完成时间
     */
    @ApiModelProperty(value = "支付时间")
    @ExcelField(value = "支付时间")
    private Date completeTime;
    /**
     *
     */
    @ApiModelProperty(value = "更新时间")
    @ExcelField(value = "更新时间")
    private Date deliveryTime;


    /**
     *主键
     */
    @ApiModelProperty(value = "订单ID")
    private Long id;

    /**
     *订单货物总量
     */
    @ApiModelProperty(value = "订单货物总量",hidden = true)
    private int orderGoodsNumber;
    /**
     *创建时间即是下单时间
     */
    @ApiModelProperty(value = "下单时间")
    private Date createTime;
    /**
     *订单是否发货，如果有物流编号，说明发货
     */
    @ApiModelProperty(value = "订单是否发货，如果有物流编号，说明发货")
    private String orderDelivery;
    /**
     *物流编号
     */
    @ApiModelProperty(value = "物流编号")
    private Long logisticsNumber;


    /**
     *支付方式
     */
    @ApiModelProperty(value = "支付方式（1：vx、2：支付宝）")
    private String payType;

    /**
     * 用户ID
     */
    @ApiModelProperty(hidden = true)
    private String userId;

    /**
     * 地址
     */
    private String shipping_address;

    @Override
    public String toString() {
        return "OrderVo{" +
                "serialNumber='" + serialNumber + '\'' +
                ", receiveName='" + receiveName + '\'' +
                ", receivePhone='" + receivePhone + '\'' +
                ", amount='" + amount + '\'' +
                ", status='" + status + '\'' +
                ", userName='" + userName + '\'' +
                ", completeTime=" + completeTime +
                ", deliveryTime=" + deliveryTime +
                ", id=" + id +
                ", orderGoodsNumber=" + orderGoodsNumber +
                ", createTime=" + createTime +
                ", orderDelivery='" + orderDelivery + '\'' +
                ", logisticsNumber=" + logisticsNumber +
                ", payType='" + payType + '\'' +
                ", userId='" + userId + '\'' +
                ", shipping_address='" + shipping_address + '\'' +
                '}';
    }
}
